package com.yn.method;

public class CheckAndSet {
    private int f;

    public void checkAndSetF(int f) {
        if (f >= 0) {
            this.f = f;
        } else {
            throw new IllegalArgumentException();
        }
    }

    public void checkAndSetF1(int f) {
        boolean a = true;
        boolean b = f >= 0;
    }
}
